package com.ytc.service.impl;

import com.ytc.mapper.HeroMapper;
import com.ytc.model.Hero;
import com.ytc.service.HeroService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class HeroServiceImpl implements HeroService {
    @Autowired
    private HeroMapper heroMapper;

    @Override
    public List<Hero> queryHeroList() {
        return heroMapper.queryHeroList();
    }

    @Override
    public void addHero(Hero hero) {
        heroMapper.addHero(hero);
    }
}
